package dancetiktokenumsmysql

const (
	// 戒指活动模式类型
	RingModelTypeMarriageProposal     = 1 // 求婚-浓情
	RingModelTypeMarriageEngagement   = 2 // 订婚-蜜意
	RingModelTypeMarried              = 3 // 结婚-星缘
	RingModelTypeMarriageProposalHalf = 4 // 求婚-浓情半价
	RingModelTypeMonthlyContract      = 5 // 月契

	// 模式阶段
	RingModelStageOpen         = 1 // 开启模式
	RingModelStageFortuneValue = 2 // 福气值打满

	// 戒指活动模式开关
	RingModelConfigSwitchOff  = 0 // 关闭
	RingModelConfigSwitchOpen = 1 // 开启

	RingModelOpenRedPacketStatusNoOpen = 0 // 未开红包
	RingModelOpenRedPacketStatusOpened = 1 // 已开红包

	RingModelDurationTime = 60 * 30 // 戒指模式开启持续时长(秒)

	RingMarriageProposalModelStatusStart     = 1 // 已开启
	RingMarriageProposalModelStatusEnd       = 2 // 正常结束
	RingMarriageProposalModelStatusClientEnd = 3 // 客户端主动结束
)

type DanceRingEnums struct {
}

var DanceRingObject DanceRingEnums

func (d DanceRingEnums) ConditionsType() []int {
	return []int{
		RingModelTypeMarriageProposal,
		RingModelTypeMarriageEngagement,
		RingModelTypeMarried,
		RingModelTypeMarriageProposalHalf,
		RingModelTypeMonthlyContract,
	}
}

func (d DanceRingEnums) RingModelTypeMap() map[int]string {
	m := make(map[int]string)
	for _, s := range d.ConditionsType() {
		m[s] = d.RingModelTypeString(s)
	}
	return m
}

func (d DanceRingEnums) RingModelTypeString(tag int) string {
	switch tag {
	case RingModelTypeMarriageProposal:
		return "蜜意"
	case RingModelTypeMarriageEngagement:
		return "蜜意"
	case RingModelTypeMarried:
		return "星缘"
	case RingModelTypeMarriageProposalHalf:
		return "蜜意半价"
	case RingModelTypeMonthlyContract:
		return "月契"
	default:
		return "未知"
	}
}

func (d DanceRingEnums) ConditionsStage() []int {
	return []int{
		RingModelStageOpen,
		RingModelStageFortuneValue,
	}
}

func (d DanceRingEnums) RingModelStageMap() map[int]string {
	m := make(map[int]string)
	for _, s := range d.ConditionsStage() {
		m[s] = d.RingModelStageString(s)
	}
	return m
}

func (d DanceRingEnums) RingModelStageString(tag int) string {
	switch tag {
	case RingModelStageOpen:
		return "开启模式"
	case RingModelStageFortuneValue:
		return "福气值打满"
	default:
		return "未知"
	}
}
